#ifndef Trace_h
#define Trace_h

#include "File.h"
#include "CriticalSection.h"
#include "Timer.h"


class Trace_T
{
private:
	static File_T * s_filePtr;
	static CriticalSection_T s_cs;
	static Timer_T s_timer;

public:
	static void Open(const char * szFilename);
	static void Initialize(const char * sz);
	static void Write(const char * sz, ...);
	static void Write(DWORD dwError, const char * szFile, int iLine, const char * szFunction);
	static void Close();

private:
	static void WriteDate();
};

#endif //Trace_h